var o = require("G");
cc.Class({
    extends: cc.Component,
    properties: {
        goldLabel: cc.Label,
        goldAnimationLayer: cc.Node
    },
    onLoad: function () {
        var t = this;
        t.goldLabel.string = o.LocalStorage.get("gold"), cc.director.on("gold", function (e) {
            t.goldLabel && (t.goldLabel.string = o.LocalStorage.get("gold"));
        });
    },
    // moveAnimation: function () {
    //     this.goldAnimationLayer.active = !0;
    //     var t = this.goldAnimationLayer.convertToNodeSpaceAR(this.node.convertToWorldSpaceAR(cc.v2(0, 0)));
    //     this.goldAnimationLayer.getComponent("GoldAnimationLayer").moveAnimation(t, function () {
    //         var t = o.LocalStorage.get("gold");
    //         o.LocalStorage.set("gold", t + 1), cc.director.emit("gold");
    //     });
    // },
    // videoReward: function () {
    //     o.Interface.showRewardedAD(function () {
    //         this.moveAnimation(), o.Interface.hitBox("获得10个金币");
    //     }.bind(this));
    // },
    // shareReward: function () {
    //     console.log("global.serverTime", o.serverTime);
    //     var t = parseInt(o.serverTime);
    //     o.Interface.share({
    //         utc: t,
    //         type: 1
    //     }), o.t1 = Date.parse(new Date());
    // },
    add: function () {
        // o.config ? (console.log("测试"), this.videoReward()) : (console.log("正式"), console.log("isOkVideo: ", o.Interface.isOkVideo()),
        //     o.Interface.isOkVideo() ? (console.log("看视频获取金币奖励"), this.videoReward()) : console.log("无广告"));
        this.goldLabel.string = o.LocalStorage.get("gold");
    }
})